/**
 * 活动管理,
 * meta字段说明:
 *  title: 作为网页标题使用
 *  breadcrumb: 是否显示在面包屑导航上面
 *  disableBreadcrumb: 在面包屑导航上面点击是否会跳转
 */
import layout from '@components/layout'
import secondRouteView from '@components/secondRouteView'
const _import = file => () => import('@views/' + file + '.vue')
export default {
  path: '/activity',
  name: 'activity',
  meta: {
    breadcrumb: false,
    title: '活动管理'
  },
  component: layout,
  children: [
    {
      path: 'sign-up',
      name: 'activity.sign-up',
      meta: {
        breadcrumb: false,
        title: '活动报名'
      },
      component: secondRouteView,
      children: [
        {
          path: 'items/1/:page(\\d+)?',
          name: 'activity.sign-up.items.1',
          props: {status: 1},
          meta: {
            breadcrumb: true,
            title: '报名记录'
          },
          component: _import('activity/sign-up/items')
        },
        {
          path: 'items/2/:page(\\d+)?',
          name: 'activity.sign-up.items.2',
          props: {status: 2},
          meta: {
            breadcrumb: true,
            title: '往期记录'
          },
          component: _import('activity/sign-up/items')
        },
        {
          path: 'detail/:group_stage_id',
          name: 'activity.sign-up.detail',
          props: {status: 2},
          meta: {
            breadcrumb: true,
            title: '报名记录详情'
          },
          component: _import('activity/sign-up/detail')
        }
      ]
    },
    {
      path: 'setting',
      name: 'activity.setting',
      meta: {
        breadcrumb: false,
        title: '设置'
      },
      component: secondRouteView,
      children: [
        {
          path: 'banner',
          name: 'activity.setting.banner',
          meta: {
            breadcrumb: true,
            title: '设置轮播图'
          },
          component: _import('activity/setting/banner')
        },
        {
          path: 'customer',
          name: 'activity.setting.customer',
          meta: {
            breadcrumb: true,
            title: '客服电话'
          },
          component: _import('activity/setting/customer')
        }
      ]
    },
    {
      path: 'refund',
      name: 'activity.refund',
      meta: {
        breadcrumb: false,
        title: '退款管理'
      },
      component: secondRouteView,
      children: [
        {
          path: 'items/1/:page(\\d+)?',
          name: 'activity.refund.items.1',
          props: {status: 1},
          meta: {
            breadcrumb: true,
            title: '待处理'
          },
          component: _import('activity/refund/items')
        },
        {
          path: 'items/2/:page(\\d+)?',
          name: 'activity.refund.items.2',
          props: {status: 2},
          meta: {
            breadcrumb: true,
            title: '退款中'
          },
          component: _import('activity/refund/items')
        },
        {
          path: 'items/3/:page(\\d+)?',
          name: 'activity.refund.items.3',
          props: {status: 3},
          meta: {
            breadcrumb: true,
            title: '退款成功'
          },
          component: _import('activity/refund/items')
        },
        {
          path: 'items/4/:page(\\d+)?',
          name: 'activity.refund.items.4',
          props: {status: 4},
          meta: {
            breadcrumb: true,
            title: '退款失败/拒绝'
          },
          component: _import('activity/refund/items')
        }
      ]
    },
    {
      path: 'order',
      name: 'activity.order',
      meta: {
        breadcrumb: false,
        title: '活动订单'
      },
      component: secondRouteView,
      children: [
        {
          path: 'items/1/:page(\\d+)?',
          name: 'activity.order.items.1',
          props: {status: 1},
          meta: {
            breadcrumb: true,
            title: '待支付'
          },
          component: _import('activity/order/items')
        },
        {
          path: 'items/2/:page(\\d+)?',
          name: 'activity.order.items.2',
          props: {status: 2},
          meta: {
            breadcrumb: true,
            title: '交易关闭(支付超时)'
          },
          component: _import('activity/order/items')
        },
        {
          path: 'items/3/:page(\\d+)?',
          name: 'activity.order.items.3',
          props: {status: 3},
          meta: {
            breadcrumb: true,
            title: '交易关闭(全额退款)'
          },
          component: _import('activity/order/items')
        },
        {
          path: 'items/4/:page(\\d+)?',
          name: 'activity.order.items.4',
          props: {status: 4},
          meta: {
            breadcrumb: true,
            title: '交易关闭(出行人全部取消)'
          },
          component: _import('activity/order/items')
        },
        {
          path: 'items/99/:page(\\d+)?',
          name: 'activity.order.items.99',
          props: {status: 99},
          meta: {
            breadcrumb: true,
            title: '报名成功'
          },
          component: _import('activity/order/items')
        }
      ]
    },
    {
      path: 'manager',
      name: 'activity.manager',
      meta: {
        breadcrumb: false,
        title: ''
      },
      component: secondRouteView,
      children: [
        {
          path: 'all/items/:page(\\d+)?',
          name: 'activity.manager.items.all',
          meta: {
            breadcrumb: true,
            title: '活动列表'
          },
          component: _import('activity/manager/items')
        },
        {
          path: '99/items/:page(\\d+)?',
          name: 'activity.manager.items.99',
          props: {status: 99},
          meta: {
            breadcrumb: true,
            title: '上架中'
          },
          component: _import('activity/manager/items')
        },
        {
          path: '1/items/:page(\\d+)?',
          name: 'activity.manager.items.1',
          props: {status: 1},
          meta: {
            breadcrumb: true,
            title: '已下架'
          },
          component: _import('activity/manager/items')
        },
        {
          path: 'previous/items/:page(\\d+)?',
          name: 'activity.manager.items.previous',
          props: {status: 'previous'},
          meta: {
            breadcrumb: true,
            title: '往期活动'
          },
          component: _import('activity/manager/items')
        },
        {
          path: 'traveling/items/:page(\\d+)?',
          name: 'activity.manager.items.traveling',
          props: {status: 'traveling'},
          meta: {
            breadcrumb: true,
            title: '出行中'
          },
          component: _import('activity/manager/items')
        },
        {
          path: 'add',
          name: 'activity.manager.add',
          meta: {
            breadcrumb: true,
            title: '新增活动'
          },
          component: _import('activity/manager/add')
        },
        {
          path: 'edit/:activity_id(\\d+)',
          name: 'activity.manager.edit',
          meta: {
            breadcrumb: true,
            title: '编辑活动'
          },
          component: _import('activity/manager/edit')
        }
      ]
    }
  ]
}
